home *** CD-ROM | disk | FTP | other *** search
/ Scene Storm / Scene Storm - Volume 1.iso / coding / c / dependantscan / source / localedps.c < prev    next >
C/C++ Source or Header  |  1995-11-14  |  5KB  |  85 lines

  1. #define DEF_LOCALEDPS_C
  2.  
  3. #include <stdio.h>
  4.  
  5. #include "DependantScan.h"
  6.  
  7. char *DpSMessageText[DPS_MSG_COUNT] =                                     /* text that we use for various messages */
  8. {
  9.     "PATH",                                                                        /* DPS_ARG_PATH */
  10.     "PROJECT",                                                                    /* DPS_ARG_PROJECT */
  11.     "MATCH",                                                                        /* DPS_ARG_MATCH */
  12.     "MAKEFILE",                                                                    /* DPS_ARG_MAKEFILE */
  13.     "RULES",                                                                        /* DPS_ARG_RULES */
  14.     "OBJECT_DIR",                                                                /* DPS_ARG_OBJECT_DIR */
  15.     "FILESONLINE",                                                                /* DPS_ARG_FILESONLINE */
  16.     "FROM",                                                                        /* DPS_ARG_FROM */
  17.     "LIBRARY",                                                                    /* DPS_ARG_LIBRARY */
  18.     "VERBOSE",                                                                    /* DPS_ARG_VERBOSE */
  19.     NULL,                                                                            /* DPS_ARG_COUNT */
  20.     "%s/K,",                                                                        /* DPS_TEMPLATE_PATH */
  21.    "%s/K,",                                                                        /* DPS_TEMPLATE_PROJECT */
  22.      "%K,",                                                                        /* DPS_TEMPLATE_MATCH */
  23.      "MK=%s/K,",                                                 /* DPS_TEMPLATE_MAKEFILE */
  24.      "%s/K,",                                                                        /* DPS_TEMPLATE_RULES */
  25.      "OBJ=%s/K,",                                                                /* DPS_TEMPLATE_OBJECT_DIR */
  26.      "N=%s/N/K,",                                                                /* DPS_TEMPLATE_FILESONLINE */
  27.      "%s/K,",                                                                        /* DPS_TEMPLATE_FROM */
  28.      "LIB=%s/K,",                                                                /* DPS_TEMPLATE_LIBRARY */
  29.      "%s/S",                                                                        /* DPS_TEMPLATE_VERBOSE */
  30.  
  31.      "Usage: DependantScan",                                     /* DPS_MSG_USAGE */
  32.      "= the directory to be scanned for files (default: current directory)",                            /* DPS_MSG_USE_PATH */
  33.      "= primary target of 'filename' (default: from scoptions or \""DPS_DEFAULT_PROJECT"\")",        /* DPS_MSG_USE_PROJECT */
  34.      "= file(s) to be scanned for inclusion (default: \""DPS_DEFAULT_MATCH"\")",                        /* DPS_MSG_USE_MATCH */
  35.      "= make file to be created (default: \""DPS_DEFAULT_MAKEFILE"\")",                                    /* DPS_MSG_USE_MAKEFILE */
  36.      "= a file to be inserted at the top of the output makefile",                                            /* DPS_MSG_USE_RULES */
  37.      "= directory for temporary files, with trailing '/' or ':' (default: \""DPS_DEFAULT_OBJECT_DIR"\")",
  38.      "= maximum number of files on a line of the makefile (default: \"5\")",                            /* DPS_MSG_USE_FILESONLINE */
  39.      "= first item(s) (startup code) on the link line (default: \""DPS_DEFAULT_FROM"\")",            /* DPS_MSG_USE_FROM */
  40.      "= first item(s) on the library line (default: \""DPS_DEFAULT_LIBRARY"\")",                        /* DPS_MSG_USE_LIBRARY */
  41.      "- if specified, progress will be displayed",                    /* DPS_MSG_USE_VERBOSE */
  42.  
  43.     "Building object file dependency list: ",                            /* DPS_MSG_PASS1_BEGINNING */
  44.    ".",                                                                            /* DPS_MSG_PASS1_PROGRESS */
  45.    "\nBuilding link list: ",                                                /* DPS_MSG_BUILDING_LINK_LIST */
  46.    "\nScanning source code for dependants:\n",                        /* DPS_MSG_PASS2_BEGINNING */
  47.    "\"%s\" ",                                                                    /* DPS_MSG_PASS2_FILE */
  48.     "\x1b[42m+\x1b[40m",                                                        /* DPS_MSG_PASS2_PROGRESS */
  49.    "\n",                                                                            /* DPS_MSG_PASS2_SEPARATOR */
  50.     "including %s\n",                                                            /* DPS_MSG_INCLUDING_RULES */
  51.     "Creating %s\n",                                                            /* DPS_MSG_CREATING_SMAKEFILE */
  52.     "Closing %s\n",                                                            /* DPS_MSG_CLOSING_SMAKEFILE */
  53.  
  54.     "\0$VER: DependantScan v1.0 by Ray Darrah III",                    /* so that the 'version' program can print our version number */
  55.     "DependantScan",                                                            /* DPS_MSG_DEPENDANTSCAN */
  56.     "DependantScan Error",                                                    /* DPS_MSG_DEPENDANTSCAN_ERROR */
  57.     "DARN!",                                                                        /* DPS_MSG_DARN */
  58.     "\"%s\" created for %s",                                    /* DPS_MSG_SUCCESSFUL */
  59.     "DependantScan Message",                                                /* DPS_MSG_DEPENDANTSCAN_MSG */
  60.     "COOL",                                                                        /* DPS_MSG_COOL */
  61.  
  62.    "ERROR #%ld: could not open %s",                                        /* DPS_ERROR_CANNOT_OPEN_FILE */
  63.    "ERROR #%ld: could not write %ld bytes to %s",                    /* DPS_ERROR_CANNOT_WRITE_FILE */
  64.    "ERROR #%ld: could not allocate %ld bytes of memory",            /* DPS_ERROR_CANNOT_ALLOCATE */
  65.    "ERROR #%ld: call to AllocDosObject() failed",                    /* DPS_ERROR_ALLOCDOSOBJECT */
  66.    "ERROR #%ld: pass %ld unsuccessful"                                    /* DPS_ERROR_PASS_UNSUCCESSFUL */
  67. };
  68.  
  69. /*
  70.     char *dps_locale_string(
  71.         int message_index)                                                    the desired message number
  72.  
  73.    * Description
  74.       This function is my attempt at designing this program to be used with the locale.library. But, since I am not "registered developer"
  75.       (and wish I were), I do not have documentation on how to use this library. However, I do know that a function similar to this is
  76.       needed to begin such support.
  77.  
  78.         This function returns a string (supposedly in a certain language) the corresponds to 'message_index'
  79. */
  80. char *dps_locale_string(
  81.     int message_index)                                          /* the desired message number */
  82. {
  83.     return (DpSMessageText[message_index]);                     /* return the desired message */
  84. }
  85.